package com.cnpc.fyutils;

import android.app.Activity;
import android.view.inputmethod.InputMethodManager;

/**
 * 软键盘的工具类
 */
public class Keyboard_Util {

	/**
	 * 将软键盘隐藏的方法
	 */
	public static void Hide_Keyboard(Activity activity) {


		try {
			((InputMethodManager) activity.getSystemService(activity.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(
                    activity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}
